/*****************************************************************************
Copyright 2006 Kervin L. Pierre
    EMAIL: otlkcon@adevsoft.com

This file is part of Otlkcon.

Otlkcon is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

Otlkcon is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Lesser GNU General Public License for more details.

You should have received a copy of the Lesser GNU General Public License
along with Otlkcon; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*******************************************************************************/

#pragma once
#include "StdAfx.h"
#include "O_IContainer.h"

#include <string>
#include <map>

using namespace std;

class O_IFolder : public O_IContainer
{

public:
	//MAPI_IUNKNOWN_METHODS(IMPL);
    MAPI_IMAPIFOLDER_METHODS(IMPL);

	//Henry 30.11.2005
	//Overload that function to notify clients
	STDMETHODIMP SaveChanges( ULONG ulFlags );

	O_IFolder(void);
    ~O_IFolder(void);

    void Destroy();

    HRESULT Create(otlkcon_generic_msgstore *mstr, MAPIUID ig, char *name, O_IFolder *parent);
    HRESULT Load(otlkcon_generic_msgstore *msgstr, O_ENTRYID *eid);
	
    HRESULT ProcessEvent( otlkcon_event_struct *ev );

	BOOL	bRootFolder;

    //! Is this folder a view of a folder in a foreign/remote system?
    //BOOL    foreignView;

    //! Map of name-to-EntryIDs in this folder.  Needed if
    //! this folder represents a view of a remote folder,
    //! as with remote calendar folders for instance.

    // FIXME: This needs to be replaced by the contents table
    //map<wstring,O_ENTRYID*> msgForeignKeyMap;
};
